package org.posta.mail.server;

import org.posta.data.DataStore;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.inject.Inject;

public class ShutdownHandler extends Thread
{
    private static Logger log = LoggerFactory.getLogger(ShutdownHandler.class);
    
    @Inject
    private DataStore     dataStore;
    
    @Override
    public void run()
    {
        log.info("Shutdown started");
        dataStore.stop();
        log.info("Shutdown completed");
    }
    
}
